package com.channelsharing.hongqu.supplier.api.controller.seckillgoods;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class SecKillGoodsAddRequestEntity {

    @ApiModelProperty(value = "产品id", example="1")
    @NotNull
    public Long productId;		//

    @ApiModelProperty(value = "秒杀售价", example="99.55")
    @NotNull
    public BigDecimal secKillPrice;		// 秒杀售价

    @ApiModelProperty(value = "秒杀数量", example="80.01")
    @NotNull
    public Integer restAmount;		// 秒杀数量

    @ApiModelProperty(value = "开始时间")
    @NotNull
    @Future
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    public Date startTime;		// 开始时间

    @ApiModelProperty(value = "结束时间")
    @NotNull
    @Future
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    public Date endTime;		// 结束时间

}
